package mrHunter;

import java.util.HashMap;
import java.util.Map;

public class MRInf {
    private String resultType;
    private String puzzleType;
    private int problemNo;
    private String username;
    private int sourceInputNum;
    private int followUpInputNum;
    private String MR1;
    private String MR2;
    private String result;
    private String time;

    private String input;
    private String output;
    private Boolean formOn;
    private Map<String,String> userInAndOut;

    public MRInf(){}

    public MRInf(int problemNo,String puzzleType, String username){
        this.username=username;
        this.problemNo=problemNo;
        this.puzzleType=puzzleType;
        this.MR1="";
        this.MR2="";
        this.result="";
        this.input="";
        this.output="";
        this.time="";
        this.resultType="";
        this.userInAndOut=new HashMap<>();
        this.followUpInputNum=1;
        this.sourceInputNum=1;
        this.formOn=false;
    }

    public int getProblemNo(){return problemNo;}

    public void setProblemNo(int problemNo){this.problemNo=problemNo;}

    public String getMR1() {
        return MR1;
    }

    public String getMR2() {
        return MR2;
    }

    public void setMR1(String MR1) {
        this.MR1 = MR1;
    }

    public void setMR2(String MR2) {
        this.MR2 = MR2;
    }

    public String getResult() {
        return result;
    }

    public void setResult(String result) {
        this.result = result;
        if(result.equals("compile failed"))
            this.resultType="Compile Failed";
        else if(result.equals("You passed!"))
            this.resultType="Pass";
        else
            this.resultType="Wrong Answer";
    }

    public String getOutput() {
        return output;
    }

    public void setOutput(String output) {
        this.output = output;
    }

    public String getInput() {
        return input;
    }

    public void setInput(String input) {
        this.input = input;
    }
    public Map<String, String> getUserInAndOut() {
        return userInAndOut;
    }

    public void setUserInAndOut(String input,String output) {
        this.userInAndOut.put(input,output);
    }

    public void setFollowUpInputNum(int followUpInputNum) {
        this.followUpInputNum = followUpInputNum;
    }

    public int getFollowUpInputNum() {
        return followUpInputNum;
    }

    public int getSourceInputNum() {
        return sourceInputNum;
    }

    public void setSourceInputNum(int sourceInputNum) {
        this.sourceInputNum = sourceInputNum;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getResultType() {
        return resultType;
    }

    public void setResultType(String resultType) {
        this.resultType = resultType;
    }

    public String getPuzzleType() {
        return puzzleType;
    }

    public void setPuzzleType(String puzzleType) {
        this.puzzleType = puzzleType;
    }

    public void setFormOn(Boolean formOn){
        this.formOn=formOn;
    }

    public Boolean getFormOn() {
        return formOn;
    }

}
